package com.liujun.spring4.demo.aop.iocset.annotation.autowired.lazy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

/**
 * @author liujun
 * @version 1.0
 * @date 2018-08-19 16:44:00
 */
@Service
public class RunLazyService {

  /** 延迟加载的接口服务 */
  private LazyService lazyService;

  public void runLzay() {
    lazyService.lazyMethod("this run methos");
  }

  @Lazy
  @Autowired(required = false)
  public void setLazyService(LazyService lazyService) {
    this.lazyService = lazyService;
  }
}
